<?php
/**
 * XueYuan Project
 *
 * @package	XueYuan 
 * @author	Jiuchi Team
 * @since	Version 1.0.0
 * @filesource
 */
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * User concern model class
 * @author Wayne Yu
 */
class User_concern_model extends Jiuchi_Model{
	/**
	 * Construct function
	 */
	public function __construct() {
		parent::__construct();
		$this->table = 'user_concern';
	}
	
	/**
	 * Count how many people be concerned
	 */
	public function getConcernCount($uid){
		$count = 1;
		$res = $this->retrieve($count, NULL, NULL, NULL, array('user_id' => $uid));
		return $res;
	}
	
	/**
	 * Count have how many fans 
	 */
	public function getFansCount($uid){
		$count = 1;
		$res = $this->retrieve($count, NULL, NULL, NULL, array('concern_id' => $uid));
		return $res;
	}
}